package com.yami.shop.mystery.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.mystery.common.dto.MysteryBoxOpenRecordDto;
import com.yami.shop.mystery.common.model.MysteryBoxOpenRecord;
import org.apache.ibatis.annotations.Param;

/**
 * @author wxf
 * @date 2023/4/14 16:33
 */
public interface MysteryBoxOpenRecordMapper extends BaseMapper<MysteryBoxOpenRecord> {

    /**
     *  用户-查询已开盲盒列表
     *
     * @param page
     * @param userId
     * @return
     */
    IPage<MysteryBoxOpenRecord> getMyOpenBoxPage(@Param("page") PageParam<MysteryBoxOpenRecord> page, @Param("userId") String userId, @Param("param") MysteryBoxOpenRecord param);

    PageParam<MysteryBoxOpenRecordDto> selectPageByUserIdAnBoxId(PageParam<MysteryBoxOpenRecord> page, @Param("boxId") Long boxId,@Param("userId")  String userId);
}
